package top.hkyzf.study.j2se.juc;

/**
 * @author 朱峰
 * @date 2021-12-28 23:08
 */
public class ThreadDemo2 {
    public static void main(String[] args) {
        Thread thread = new Thread(new MyThread());
        System.out.println("线程：" + Thread.currentThread().getName() + " 执行了！");
        thread.start();
    }
}

class MyThread implements Runnable {
    @Override
    public void run() {
        System.out.println("线程：" + Thread.currentThread().getName() + " 执行了！");
    }
}
